import request from '@/utils/request'


export function listCategory(query) {return service.get('')
  return request({
    url: '/warehouse/category/list',
    method: 'get',
    params: query
  })
}


export function getCategory(id) {
  return request({
    url: '/warehouse/category/' + id,
    method: 'get'
  })
}


export function addCategory(data) {
  return request({
    url: '/warehouse/category',
    method: 'post',
    data: data
  })
}

export function updateCategory(data) {
  return request({
    url: '/warehouse/category',
    method: 'put',
    data: data
  })
}


export function delCategory(selectedIds) {
  return request({
    url: '/warehouse/category',
    method: 'delete',
    data:toRaw(selectedIds) //传参直接传数组值即可
  })
}
